package com.tiyunge.system.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.tiyunge.common.annotation.Excel;
import com.tiyunge.common.annotation.Excel.ColumnType;
import com.tiyunge.common.core.domain.BaseEntity;

/**
 * 知识看点对象 sys_knowledge
 * 
 * @author yejiayu
 *
 */
public class SysKnowledge extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 知识看点ID */
    private Long knowledgeId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 科目分类 */
    @Excel(name = "科目分类")
    private String subjectCategory;

    /** 封面图片 */
    @Excel(name = "封面图片")
    private String coverImage;

    /** 阅读量 */
    @Excel(name = "阅读量")
    private Integer readCount;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 发布日期 */
    @Excel(name = "发布日期")
    private String publishDate;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public void setKnowledgeId(Long knowledgeId) 
    {
        this.knowledgeId = knowledgeId;
    }

    public Long getKnowledgeId() 
    {
        return knowledgeId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    @NotBlank(message = "标题不能为空")
    @Size(min = 0, max = 200, message = "标题长度不能超过200个字符")
    public String getTitle() 
    {
        return title;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    @NotBlank(message = "内容不能为空")
    public String getContent() 
    {
        return content;
    }

    public void setSubjectCategory(String subjectCategory) 
    {
        this.subjectCategory = subjectCategory;
    }

    @Size(min = 0, max = 50, message = "科目分类长度不能超过50个字符")
    public String getSubjectCategory() 
    {
        return subjectCategory;
    }

    public void setCoverImage(String coverImage) 
    {
        this.coverImage = coverImage;
    }

    @Size(min = 0, max = 500, message = "封面图片长度不能超过500个字符")
    public String getCoverImage() 
    {
        return coverImage;
    }

    public void setReadCount(Integer readCount) 
    {
        this.readCount = readCount;
    }

    public Integer getReadCount() 
    {
        return readCount;
    }

    public void setAuthor(String author) 
    {
        this.author = author;
    }

    @Size(min = 0, max = 100, message = "作者长度不能超过100个字符")
    public String getAuthor() 
    {
        return author;
    }

    public void setPublishDate(String publishDate) 
    {
        this.publishDate = publishDate;
    }

    public String getPublishDate() 
    {
        return publishDate;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("knowledgeId", getKnowledgeId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("subjectCategory", getSubjectCategory())
            .append("coverImage", getCoverImage())
            .append("readCount", getReadCount())
            .append("author", getAuthor())
            .append("publishDate", getPublishDate())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
